﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace SIS.DataAccess
{
	/// <summary>
	/// Author: hieunv
	/// </summary>
	[Serializable]
	class Teaches : DataTable
	{
		public const string INSTRUCTOR_ID = "ID";
		public const string COURSE_ID = "course_id";
		public const string SECTION_ID = "sec_id";
		public const string SEMESTER = "semester";
		public const string YEAR = "year";

		public Teaches()
			: base("Teaches")
		{
			var instructorID = new DataColumn(INSTRUCTOR_ID, typeof(string));
			instructorID.AllowDBNull = false;
			this.Columns.Add(instructorID);
			var courseID = new DataColumn(COURSE_ID, typeof(string));
			courseID.AllowDBNull = false;
			this.Columns.Add(courseID);
			var sectionID = new DataColumn(SECTION_ID, typeof(string));
			sectionID.AllowDBNull = false;
			this.Columns.Add(sectionID);
			var semester = new DataColumn(SEMESTER, typeof(string));
			semester.AllowDBNull = false;
			this.Columns.Add(semester);
			var year = new DataColumn(YEAR, typeof(int));
			year.AllowDBNull = false;
			this.Columns.Add(year);
			this.PrimaryKey = new DataColumn[] { instructorID, courseID, sectionID, semester, year };
		}
	}
}
